package com.tinyseed.emcp.api.app.common;

import java.util.HashMap;
import java.util.Map;

/***
 * @ClassName: Constant
 * @Description: TODO
 * @Auther: Harlan.Xiong
 * @Date: 2019-11-24 20:51
 * @version : V1.0
 */
public class Constant {
    /**
     * 节点类型：机构
     */
    public static final String TREE_NODE_ORGANIZE = "1";
    /**
     * 节点类型：公司
     */
    public static final String TREE_NODE_ENTERPRISE = "2";
    /**
     * 节点类型：车间
     */
    public static final String TREE_NODE_WORKSHOP = "3";
    /**
     * 节点类型：监测点
     */
    public static final String TREE_NODE_MONITOR = "4";

    /**
     * 节点类型：监测点-产污
     */
    public static final String TREE_NODE_MONITOR_PRODUCE_POLLUTION = "4-1";

    /**
     * 节点类型：监测点-治污
     */
    public static final String TREE_NODE_MONITOR_REDUCE_POLLUTION = "4-2";
    /**
     * 节点类型：设备
     */
    public static final String TREE_NODE_DEVICE = "5";

    /**
     * 公司id前缀
     */
    public static final String ENTERPRISE_ID_REFIX = "ENT";

    /**
     * 车间id前缀
     */
    public static final String WORKSHOP_ID_REFIX = "WOR";

    /**
     * 监控id前缀
     */
    public static final String MONITOR_PRODUCE_POLLUTION_ID_REFIX = "MPP";
    public static final String MONITOR_REDUCE_POLLUTION_ID_REFIX = "MRP";
    public static final String MONITOR_ID_REFIX = "MON";

    /**
     * 企业监控-产污treeID
     */
    public static final String MONITOR_PRODUCE_TREE_ID = "PRODUCE_TREE_ID";
    /**
     * 企业监控-产污treeNAME
     */
    public static final String MONITOR_PRODUCE_TREE_NAME = "产污监测点";
    /**
     * 企业监控-治污treeID
     */
    public static final String MONITOR_POLLUTION_TREE_ID = "POLLUTION_TREE_ID";
    /**
     * 企业监控-治污treeNAME
     */
    public static final String MONITOR_POLLUTION_TREE_NAME = "治污监测点";

    /**
     * 监测点类型：1-治污监测点
     */
    public static final String MONITOR_PRODUCE_TYPE = "1";

    /**
     * 监测点类型：1-产污监测点
     */
    public static final String MONITOR_POLLUTION_TYPE = "2";

    /**
     * 设备类型
     */
    public static final String MONITOR_PRODUCE_POLLUTION = "1";
    public static final String MONITOR_REDUCE_POLLUTION = "2";
    public static final String OBJECT_TYPE_MONIROT = "Monitor";

    public static final Map<Integer, String> EVENT_TYPE_MAP = new HashMap<>();

    public static final String RULE_RUNING_NORMAL = "0";
    public static final String RULE_RUNING_LIMIT = "50";
    public static final String RULE_RUNING_STOP = "99";
    public static final String REDIS_MONITOR_PRE = "MONITOR_"; //最新一条设备数据

    static {
        EVENT_TYPE_MAP.put(1, "设备停电");
        EVENT_TYPE_MAP.put(3, "停产异常");
        EVENT_TYPE_MAP.put(4, "治污设施异常");
    }

}
